package java8_11;

/**
 * @author oldliu
 * @since 1.0
 */
public class Choushu {
    public static void main(String[] args) {
        int xl = 0;
        //28=2*2*7 ,1,2,3,5
        //分解质因数：只能包含2,3,5
        for (int a = 1; ; a++) {
            int num = a;
            int d = a;
            while (num % 2 == 0) {
                num = num / 2;
            }
            while (num % 3 == 0) {
                num = num / 3;
            }
            while (num % 5 == 0) {
                num = num / 5;
            }
            if (num == 1) {
                System.out.print(d + " ");
                xl++;
                if (xl % 10 == 0)
                    System.out.println();
                if (xl == 1500) {
                    break;
                }
            }
        }
    }
}
